<!DOCTYPE html>
<html lang="en" ng-app="SecDemoApp">
<head>
    <meta charset="UTF-8">
    <title>添加资源</title>
    <script src="/static/lib/angular.min.js"></script>
    <script src="/static/lib/jquery-1.11.2.min.js"></script>
    <script src="/static/js/global.js"></script>
    <script src="/static/js/application.js"></script>
    <script src="/static/js/res.js"></script>
</head>
<body>
<div><a href="/pages/resource/list.html">返回资源列表</a></div>
<form ng-controller="ResAddCtrl">
    <div>资源名称：</div>
    <input type="text"  ng-model="res.name"   required>
    <div>资源认证key：</div>
    <input type="text"  ng-model="res.resKey" required>
    <div>
        <span>请选择资源类型:</span>
        <select ng-model="res.type"  required>
            <option ng-repeat="type in resTypeSelect" value="{{type.id}}">{{type.name}}</option>
        </select>
    </div>
    <div>资源链接：</div>
    <input type="text"  ng-model="res.resUrl" required>
    <div>
        <span>请选择上级资源:</span>
        <select ng-model="res.parentId"  required>
            <option ng-repeat="s in pSelect" value="{{s.id}}">{{s.name}}</option>
        </select>
    </div>
    <div>资源等级：</div>
    <input type="text"  ng-model="res.level">
    <div>资源描述：</div>
    <input type="text"  ng-model="res.description">
    <button name="add" ng-click="addRes(res)">添加资源</button>
</form>
</body>
</html>